<template>
  <page-header-wrapper>
    <a-card>
      <a-alert message="仅非独立小程序店铺有效" banner v-if="isDanDianpu"/>
      <a-tabs v-model="active">
        <a-tab-pane key="0" tab="店铺分销"></a-tab-pane>
        <a-tab-pane key="1" tab="联盟分销"></a-tab-pane>
        <a-tab-pane key="2" tab="店铺推荐人"></a-tab-pane>
        <a-tab-pane key="3" tab="消费返利"></a-tab-pane>
        <a-tab-pane key="4" tab="店铺抽成"></a-tab-pane>
        <a-tab-pane key="5" tab="供货商推荐人"></a-tab-pane>
      </a-tabs>

      <shopSetting v-if="active === '0'"></shopSetting>
      <unionSetting v-if="active === '1'"></unionSetting>
      <referrerSetting v-if="active === '2'"></referrerSetting>
      <rebateSetting v-if="active === '3'"></rebateSetting>
      <shopDraw v-if="active === '4'"></shopDraw>
      <SupplierSetting v-if="active === '5'"></SupplierSetting>
    </a-card>
  </page-header-wrapper>
</template>

<script>
import shopSetting from './components/shopSetting'
import unionSetting from './components/unionSetting'
import referrerSetting from './components/referrerSetting'
import rebateSetting from './components/rebateSetting'
import shopDraw from './components/shopDraw'
import storage from 'store'
import SupplierSetting from './components/SupplierSetting'

export default {
  components: {
    shopSetting,
    unionSetting,
    referrerSetting,
    rebateSetting,
    shopDraw,
    SupplierSetting
  },
  computed: {
    isDanDianpu () {
      return storage.get('isDandianpu')
    }
  },
  data () {
    return {
      active: '4'
    }
  }
}
</script>

<style lang="less" scoped>
</style>
